<script setup lang="ts">
import OrderList from '@/views/medicine/components/OrderList.vue'
import { OrderType } from '@/enums/index'
import { useRoute } from 'vue-router'
import { ref } from 'vue'

const route = useRoute()
const active = ref(Number(route.query.active as string))
</script>

<template>
  <div class="consult-page">
    <cp-nav-bar title="药品订单" />
    <van-tabs sticky swipeable v-model:active="active">
      <van-tab title="待付款"><order-list :status="OrderType.MedicinePay" /></van-tab>
      <van-tab title="待发货"><order-list :status="OrderType.MedicineSend" /></van-tab>
      <van-tab title="待收货"><order-list :status="OrderType.MedicineTake" /></van-tab>
      <van-tab title="已取消"><order-list :status="OrderType.MedicineCancel" /></van-tab>
      <van-tab title="已完成"><order-list :status="OrderType.MedicineComplete" /></van-tab>
    </van-tabs>
  </div>
</template>

<style lang="scss" scoped>
.consult-page {
  padding-top: 46px;
  background-color: var(--cp-bg);
  min-height: calc(100vh - 46px);
}
</style>
